<!DOCTYPE html>



  


<html class="theme-next pisces use-motion" lang="zh-CN">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="java,集合," />










<meta name="description" content="1.java常用集合类家族史:（具体请参照APIhttp:&#x2F;&#x2F;tool.oschina.net&#x2F;apidocs&#x2F;apidoc?api&#x3D;jdk-zh）常用集合如太极一般，一分为二，一者曰Collection，再者曰Map。话说，太极生两仪，两仪生四象。。。（布拉布拉。。。） Collection接口其中Collection接口一般用到的就是List和Set两种（下面其他的也会涉及到不过以这两种为主）">
<meta property="og:type" content="article">
<meta property="og:title" content="java集合详解和之间关系">
<meta property="og:url" content="https://luoyezadi.gitee.io/%E6%9C%80%E5%88%9D/java%E9%9B%86%E5%90%88%E8%AF%A6%E8%A7%A3%E5%92%8C%E4%B9%8B%E9%97%B4%E5%85%B3%E7%B3%BB/2019/04/20/index.html">
<meta property="og:site_name" content="落叶砸地">
<meta property="og:description" content="1.java常用集合类家族史:（具体请参照APIhttp:&#x2F;&#x2F;tool.oschina.net&#x2F;apidocs&#x2F;apidoc?api&#x3D;jdk-zh）常用集合如太极一般，一分为二，一者曰Collection，再者曰Map。话说，太极生两仪，两仪生四象。。。（布拉布拉。。。） Collection接口其中Collection接口一般用到的就是List和Set两种（下面其他的也会涉及到不过以这两种为主）">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://luoyezadi.gitee.io/%E6%9C%80%E5%88%9D/java%E9%9B%86%E5%90%88%E8%AF%A6%E8%A7%A3%E5%92%8C%E4%B9%8B%E9%97%B4%E5%85%B3%E7%B3%BB/2019/04/20/%E9%9B%86%E5%90%88%E6%A1%86%E6%9E%B6%E4%BD%93%E7%B3%BB1.jpg">
<meta property="og:image" content="https://luoyezadi.gitee.io/%E6%9C%80%E5%88%9D/java%E9%9B%86%E5%90%88%E8%AF%A6%E8%A7%A3%E5%92%8C%E4%B9%8B%E9%97%B4%E5%85%B3%E7%B3%BB/2019/04/20/%E9%9B%86%E5%90%88%E6%A1%86%E6%9E%B6%E4%BD%93%E7%B3%BB3.png">
<meta property="og:image" content="https://luoyezadi.gitee.io/%E6%9C%80%E5%88%9D/java%E9%9B%86%E5%90%88%E8%AF%A6%E8%A7%A3%E5%92%8C%E4%B9%8B%E9%97%B4%E5%85%B3%E7%B3%BB/2019/04/20/%E9%9B%86%E5%90%88%E6%A1%86%E6%9E%B6%E4%BD%93%E7%B3%BB2.jpg">
<meta property="article:published_time" content="2019-04-19T19:42:00.000Z">
<meta property="article:modified_time" content="2023-08-01T08:46:33.836Z">
<meta property="article:author" content="LZH">
<meta property="article:tag" content="java">
<meta property="article:tag" content="集合">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://luoyezadi.gitee.io/%E6%9C%80%E5%88%9D/java%E9%9B%86%E5%90%88%E8%AF%A6%E8%A7%A3%E5%92%8C%E4%B9%8B%E9%97%B4%E5%85%B3%E7%B3%BB/2019/04/20/%E9%9B%86%E5%90%88%E6%A1%86%E6%9E%B6%E4%BD%93%E7%B3%BB1.jpg">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '',
    scheme: 'Pisces',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: 'Author'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://luoyezadi.gitee.io/最初/java集合详解和之间关系/2019/04/20/"/>





  <title>java集合详解和之间关系 | 落叶砸地</title>
  








<meta name="generator" content="Hexo 5.4.2"></head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">落叶砸地</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">java,web,树莓派,花生壳</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/%20" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/%20" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            Archives
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://luoyezadi.gitee.io/%E6%9C%80%E5%88%9D/java%E9%9B%86%E5%90%88%E8%AF%A6%E8%A7%A3%E5%92%8C%E4%B9%8B%E9%97%B4%E5%85%B3%E7%B3%BB/2019/04/20/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="落叶砸地">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">java集合详解和之间关系</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2019-04-20T03:42:00+08:00">
                2019-04-20
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="1-java常用集合类家族史"><a href="#1-java常用集合类家族史" class="headerlink" title="1.java常用集合类家族史:"></a>1.java常用集合类家族史:</h1><p>（具体请参照API<a target="_blank" rel="noopener" href="http://tool.oschina.net/apidocs/apidoc?api=jdk-zh">http://tool.oschina.net/apidocs/apidoc?api=jdk-zh</a>）<br>常用集合如太极一般，一分为二，一者曰Collection，再者曰Map。<br>话说，太极生两仪，两仪生四象。。。（布拉布拉。。。）</p>
<h2 id="Collection接口"><a href="#Collection接口" class="headerlink" title="Collection接口"></a>Collection接口</h2><p>其中Collection接口一般用到的就是List和Set两种（下面其他的也会涉及到不过以这两种为主）：<br>以上二者，List再生ArrayList/Vector/LinkedList，Set再生TreeSet/HashSet。<br>Collection–List–ArrayList<br>      |    |–Vecter<br>      |    |–LinkedList<br>      |–Set–HashSet<br>         |–TreeSet<br>（这几个用的多，但是辈分不一样，详看下图）</p>
<span id="more"></span>
<h2 id="Map接口（图）"><a href="#Map接口（图）" class="headerlink" title="Map接口（图）"></a>Map接口（图）</h2><p>Map接口最多的就是HashMap，其他的就是看看，平时一般用不到，除非很特殊的地方<br><img src="/%E6%9C%80%E5%88%9D/java%E9%9B%86%E5%90%88%E8%AF%A6%E8%A7%A3%E5%92%8C%E4%B9%8B%E9%97%B4%E5%85%B3%E7%B3%BB/2019/04/20/%E9%9B%86%E5%90%88%E6%A1%86%E6%9E%B6%E4%BD%93%E7%B3%BB1.jpg"></p>
<h1 id="2-各自优点"><a href="#2-各自优点" class="headerlink" title="2.各自优点"></a>2.各自优点</h1><p><img src="/%E6%9C%80%E5%88%9D/java%E9%9B%86%E5%90%88%E8%AF%A6%E8%A7%A3%E5%92%8C%E4%B9%8B%E9%97%B4%E5%85%B3%E7%B3%BB/2019/04/20/%E9%9B%86%E5%90%88%E6%A1%86%E6%9E%B6%E4%BD%93%E7%B3%BB3.png"><br><img src="/%E6%9C%80%E5%88%9D/java%E9%9B%86%E5%90%88%E8%AF%A6%E8%A7%A3%E5%92%8C%E4%B9%8B%E9%97%B4%E5%85%B3%E7%B3%BB/2019/04/20/%E9%9B%86%E5%90%88%E6%A1%86%E6%9E%B6%E4%BD%93%E7%B3%BB2.jpg"></p>
<h2 id="接口"><a href="#接口" class="headerlink" title="接口"></a>接口</h2><h3 id="1-Collection-接口"><a href="#1-Collection-接口" class="headerlink" title="1.Collection 接口"></a>1.Collection 接口</h3><p>Collection 是最基本的集合接口，一个 Collection 代表一组 Object，即 Collection 的元素, Java不提供直接继承自Collection的类，只提供继承于的子接口(如List和set)。<br>Collection 接口存储一组不唯一，无序的对象。</p>
<h3 id="2-List-接口"><a href="#2-List-接口" class="headerlink" title="2.List 接口"></a>2.List 接口</h3><p>List接口是一个有序的 Collection，使用此接口能够精确的控制每个元素插入的位置，能够通过索引(元素在List中位置，类似于数组的下标)来访问List中的元素，第一个元素的索引为 0，而且允许有相同的元素。<br>List 接口存储一组不唯一，有序（插入顺序）的对象。</p>
<h3 id="3-Set-接口"><a href="#3-Set-接口" class="headerlink" title="3.Set 接口"></a>3.Set 接口</h3><p>Set 具有与 Collection 完全一样的接口，只是行为上不同，Set 不保存重复的元素。<br>Set 接口存储一组唯一，无序的对象。</p>
<h3 id="4-SortedSet"><a href="#4-SortedSet" class="headerlink" title="4.SortedSet"></a>4.SortedSet</h3><p>继承于Set保存有序的集合。</p>
<h3 id="5-Map"><a href="#5-Map" class="headerlink" title="5.Map"></a>5.Map</h3><p>Map 接口存储一组键值对象，提供key（键）到value（值）的映射。</p>
<h3 id="6-Map-Entry"><a href="#6-Map-Entry" class="headerlink" title="6.Map.Entry"></a>6.Map.Entry</h3><p>描述在一个Map中的一个元素（键/值对）。是一个Map的内部类。</p>
<h3 id="7-SortedMap"><a href="#7-SortedMap" class="headerlink" title="7.SortedMap"></a>7.SortedMap</h3><p>继承于 Map，使 Key 保持在升序排列。</p>
<p>ps：对有序的理解<br>List有序和Set无序说的是啥呢？<br>就是呀，List是进去啥顺序，出来也是啥顺序。Set呢也想保证跟List一样的顺序的话是不行的，Set会自动去重（Set内心：就是不一样！能拿我怎么样！）。<br>这就有小伙伴说了，SortedSet不是也是有序的呀，这不是跟List一样啊！这么说就不对了，此有序非彼有序，SortedSet有序是因为他会自动排序！就是说，有序的概念有很多种比如正序倒序都是有序。</p>
<h2 id="实现类"><a href="#实现类" class="headerlink" title="实现类"></a>实现类</h2><p>（太多了，列多点，其实看其中几个常用的就行了）</p>
<h3 id="1-AbstractCollection"><a href="#1-AbstractCollection" class="headerlink" title="1.AbstractCollection"></a>1.AbstractCollection</h3><p>实现了大部分的集合接口。</p>
<h3 id="2-AbstractList"><a href="#2-AbstractList" class="headerlink" title="2.AbstractList"></a>2.AbstractList</h3><p>继承于AbstractCollection 并且实现了大部分List接口。</p>
<h3 id="3-AbstractSequentialList"><a href="#3-AbstractSequentialList" class="headerlink" title="3.AbstractSequentialList"></a>3.AbstractSequentialList</h3><p>继承于 AbstractList ，提供了对数据元素的链式访问而不是随机访问。</p>
<h3 id="4-LinkedList"><a href="#4-LinkedList" class="headerlink" title="4.LinkedList"></a>4.LinkedList</h3><p>该类实现了List接口，允许有null（空）元素。主要用于创建链表数据结构，该类没有同步方法，如果多个线程同时访问一个List，则必须自己实现访问同步，解决方法就是在创建List时候构造一个同步的List。例如：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Listlist=Collections.synchronizedList(newLinkedList(...));</span><br></pre></td></tr></table></figure>
<p>LinkedList 查找效率低。</p>
<h3 id="5-ArrayList"><a href="#5-ArrayList" class="headerlink" title="5.ArrayList"></a>5.ArrayList</h3><p>该类也是实现了List的接口，实现了可变大小的数组，随机访问和遍历元素时，提供更好的性能。该类也是非同步的,在多线程的情况下不要使用。ArrayList 增长当前长度的50%，插入删除效率低。</p>
<h3 id="6-AbstractSet"><a href="#6-AbstractSet" class="headerlink" title="6.AbstractSet"></a>6.AbstractSet</h3><p>继承于AbstractCollection 并且实现了大部分Set接口。</p>
<h3 id="7-HashSet"><a href="#7-HashSet" class="headerlink" title="7.HashSet"></a>7.HashSet</h3><p>该类实现了Set接口，不允许出现重复元素，不保证集合中元素的顺序，允许包含值为null的元素，但最多只能一个。</p>
<h3 id="8-LinkedHashSet"><a href="#8-LinkedHashSet" class="headerlink" title="8.LinkedHashSet"></a>8.LinkedHashSet</h3><p>具有可预知迭代顺序的 Set 接口的哈希表和链接列表实现。</p>
<h3 id="9-TreeSet"><a href="#9-TreeSet" class="headerlink" title="9. TreeSet"></a>9. TreeSet</h3><p>该类实现了Set接口，可以实现排序等功能。</p>
<h3 id="10-AbstractMap"><a href="#10-AbstractMap" class="headerlink" title="10.AbstractMap"></a>10.AbstractMap</h3><p>实现了大部分的Map接口。</p>
<h3 id="11-HashMap"><a href="#11-HashMap" class="headerlink" title="11.HashMap"></a>11.HashMap</h3><p>HashMap 是一个散列表，它存储的内容是键值对(key-value)映射。<br>该类实现了Map接口，根据键的HashCode值存储数据，具有很快的访问速度，最多允许一条记录的键为null，不支持线程同步。</p>
<h3 id="12-TreeMap"><a href="#12-TreeMap" class="headerlink" title="12.TreeMap"></a>12.TreeMap</h3><p>继承了AbstractMap，并且使用一颗树。</p>
<h3 id="13-WeakHashMap"><a href="#13-WeakHashMap" class="headerlink" title="13.WeakHashMap"></a>13.WeakHashMap</h3><p>继承AbstractMap类，使用弱密钥的哈希表。</p>
<h3 id="14-LinkedHashMap"><a href="#14-LinkedHashMap" class="headerlink" title="14.LinkedHashMap"></a>14.LinkedHashMap</h3><p>继承于HashMap，使用元素的自然顺序对元素进行排序.</p>
<h3 id="15-IdentityHashMap"><a href="#15-IdentityHashMap" class="headerlink" title="15.IdentityHashMap"></a>15.IdentityHashMap</h3><p>继承AbstractMap类，比较文档时使用引用相等。</p>
<h3 id="java-util包中定义的类"><a href="#java-util包中定义的类" class="headerlink" title="java.util包中定义的类"></a>java.util包中定义的类</h3><h4 id="Vector"><a href="#Vector" class="headerlink" title="Vector"></a>Vector</h4><p>该类和ArrayList非常相似，但是该类是同步的，可以用在多线程的情况，该类允许设置默认的增长长度，默认扩容方式为原来的2倍。</p>
<h4 id="Stack"><a href="#Stack" class="headerlink" title="Stack"></a>Stack</h4><p>栈是Vector的一个子类，它实现了一个标准的后进先出的栈。</p>
<h4 id="Dictionary"><a href="#Dictionary" class="headerlink" title="Dictionary"></a>Dictionary</h4><p>Dictionary 类是一个抽象类，用来存储键/值对，作用和Map类相似。</p>
<h4 id="Hashtable"><a href="#Hashtable" class="headerlink" title="Hashtable"></a>Hashtable</h4><p>Hashtable 是 Dictionary(字典) 类的子类，位于 java.util 包中。</p>
<h4 id="Properties"><a href="#Properties" class="headerlink" title="Properties"></a>Properties</h4><p>Properties 继承于 Hashtable，表示一个持久的属性集，属性列表中每个键及其对应值都是一个字符串。</p>
<h4 id="BitSet"><a href="#BitSet" class="headerlink" title="BitSet"></a>BitSet</h4><p>一个Bitset类创建一种特殊类型的数组来保存位值。BitSet中数组大小会随需要增加。</p>
<h1 id="针对几个常用实现类进行详细分析"><a href="#针对几个常用实现类进行详细分析" class="headerlink" title="针对几个常用实现类进行详细分析"></a>针对几个常用实现类进行详细分析</h1><p>1.List/ArrayList/LinkedList/vector<br>2.Set/HashSet/TreeSet<br>3.HashMap/TreeMap/HashTable</p>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/java/" rel="tag"># java</a>
          
            <a href="/tags/%E9%9B%86%E5%90%88/" rel="tag"># 集合</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/%E6%9C%80%E5%88%9D/%E6%A0%91%E8%8E%93%E6%B4%BE%E5%88%B0%E6%89%8B%E9%85%8D%E7%BD%AE/2019/04/17/" rel="next" title="树莓派到手配置">
                <i class="fa fa-chevron-left"></i> 树莓派到手配置
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/%E6%9C%80%E5%88%9D/%E5%A5%BD%E7%8E%A9%E7%9A%84%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE%E5%92%8C%E5%B7%A5%E5%85%B7/2019/04/20/" rel="prev" title="好玩的开源项目和工具">
                好玩的开源项目和工具 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            Table of Contents
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            Overview
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <p class="site-author-name" itemprop="name"></p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/%20%7C%7C%20archive">
              
                  <span class="site-state-item-count">37</span>
                  <span class="site-state-item-name">posts</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                
                  <span class="site-state-item-count">8</span>
                  <span class="site-state-item-name">categories</span>
                
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                
                  <span class="site-state-item-count">43</span>
                  <span class="site-state-item-name">tags</span>
                
              </div>
            

          </nav>

          

          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#1-java%E5%B8%B8%E7%94%A8%E9%9B%86%E5%90%88%E7%B1%BB%E5%AE%B6%E6%97%8F%E5%8F%B2"><span class="nav-number">1.</span> <span class="nav-text">1.java常用集合类家族史:</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#Collection%E6%8E%A5%E5%8F%A3"><span class="nav-number">1.1.</span> <span class="nav-text">Collection接口</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Map%E6%8E%A5%E5%8F%A3%EF%BC%88%E5%9B%BE%EF%BC%89"><span class="nav-number">1.2.</span> <span class="nav-text">Map接口（图）</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#2-%E5%90%84%E8%87%AA%E4%BC%98%E7%82%B9"><span class="nav-number">2.</span> <span class="nav-text">2.各自优点</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%8E%A5%E5%8F%A3"><span class="nav-number">2.1.</span> <span class="nav-text">接口</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-Collection-%E6%8E%A5%E5%8F%A3"><span class="nav-number">2.1.1.</span> <span class="nav-text">1.Collection 接口</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-List-%E6%8E%A5%E5%8F%A3"><span class="nav-number">2.1.2.</span> <span class="nav-text">2.List 接口</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-Set-%E6%8E%A5%E5%8F%A3"><span class="nav-number">2.1.3.</span> <span class="nav-text">3.Set 接口</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4-SortedSet"><span class="nav-number">2.1.4.</span> <span class="nav-text">4.SortedSet</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#5-Map"><span class="nav-number">2.1.5.</span> <span class="nav-text">5.Map</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#6-Map-Entry"><span class="nav-number">2.1.6.</span> <span class="nav-text">6.Map.Entry</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#7-SortedMap"><span class="nav-number">2.1.7.</span> <span class="nav-text">7.SortedMap</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%9E%E7%8E%B0%E7%B1%BB"><span class="nav-number">2.2.</span> <span class="nav-text">实现类</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-AbstractCollection"><span class="nav-number">2.2.1.</span> <span class="nav-text">1.AbstractCollection</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-AbstractList"><span class="nav-number">2.2.2.</span> <span class="nav-text">2.AbstractList</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-AbstractSequentialList"><span class="nav-number">2.2.3.</span> <span class="nav-text">3.AbstractSequentialList</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4-LinkedList"><span class="nav-number">2.2.4.</span> <span class="nav-text">4.LinkedList</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#5-ArrayList"><span class="nav-number">2.2.5.</span> <span class="nav-text">5.ArrayList</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#6-AbstractSet"><span class="nav-number">2.2.6.</span> <span class="nav-text">6.AbstractSet</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#7-HashSet"><span class="nav-number">2.2.7.</span> <span class="nav-text">7.HashSet</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#8-LinkedHashSet"><span class="nav-number">2.2.8.</span> <span class="nav-text">8.LinkedHashSet</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#9-TreeSet"><span class="nav-number">2.2.9.</span> <span class="nav-text">9. TreeSet</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#10-AbstractMap"><span class="nav-number">2.2.10.</span> <span class="nav-text">10.AbstractMap</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#11-HashMap"><span class="nav-number">2.2.11.</span> <span class="nav-text">11.HashMap</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#12-TreeMap"><span class="nav-number">2.2.12.</span> <span class="nav-text">12.TreeMap</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#13-WeakHashMap"><span class="nav-number">2.2.13.</span> <span class="nav-text">13.WeakHashMap</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#14-LinkedHashMap"><span class="nav-number">2.2.14.</span> <span class="nav-text">14.LinkedHashMap</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#15-IdentityHashMap"><span class="nav-number">2.2.15.</span> <span class="nav-text">15.IdentityHashMap</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#java-util%E5%8C%85%E4%B8%AD%E5%AE%9A%E4%B9%89%E7%9A%84%E7%B1%BB"><span class="nav-number">2.2.16.</span> <span class="nav-text">java.util包中定义的类</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#Vector"><span class="nav-number">2.2.16.1.</span> <span class="nav-text">Vector</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Stack"><span class="nav-number">2.2.16.2.</span> <span class="nav-text">Stack</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Dictionary"><span class="nav-number">2.2.16.3.</span> <span class="nav-text">Dictionary</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Hashtable"><span class="nav-number">2.2.16.4.</span> <span class="nav-text">Hashtable</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Properties"><span class="nav-number">2.2.16.5.</span> <span class="nav-text">Properties</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#BitSet"><span class="nav-number">2.2.16.6.</span> <span class="nav-text">BitSet</span></a></li></ol></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E9%92%88%E5%AF%B9%E5%87%A0%E4%B8%AA%E5%B8%B8%E7%94%A8%E5%AE%9E%E7%8E%B0%E7%B1%BB%E8%BF%9B%E8%A1%8C%E8%AF%A6%E7%BB%86%E5%88%86%E6%9E%90"><span class="nav-number">3.</span> <span class="nav-text">针对几个常用实现类进行详细分析</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2023</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">LZH</span>

  
</div>


  <div class="powered-by">Powered by <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a></div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">Theme &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Pisces</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
